﻿@model MobilesStore.Domain.Entities.Product
<div>
     @if (Model.ImageData != null)
        { 
            <div class="image">
                @Html.ActionImage("Product","Detail",new {Model.ProductID},@Url.Action("GetImage", "Product", 
                    new { Model.ProductID }),@Model.ProductName,@Model.ProductName)
            </div>
        }else{
            <div class="image">
                @Html.ActionImage("Product","Detail",new {Model.ProductID},"../../Images/image/product/apple_cinema_30-162x162.jpg",@Model.ProductName,@Model.ProductName)
            </div>
        }
    <div class="name">@Html.ActionLink(Model.ProductName, "Detail", new { Model.ProductID })</div>
    <div class="description">@Model.ProductDescription</div>
    <div class="price"> <span class="price-old">@Model.ProductPrice.ToString("c")</span> <span class="price-new">@Model.ProductPrice.ToString("c")</span> <br />
              <span class="price-tax">Ex Tax: @Model.ProductPrice.ToString("c")</span> </div>
    <div class="cart">
              @using (Html.BeginForm("AddToCart", "Cart"))
              {        
                 @Html.HiddenFor(p=>p.ProductID)
                 @Html.Hidden("returnUrl",Request.Url.PathAndQuery)
                <input type="submit" value="+ Add To Cart" class="button"/>
              }
    </div>
    <div class="rating"><img src="../../Images/image/stars-4.png" alt="Based on 1 reviews." /></div>
</div>

